<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>08_作业</title>
		<script src="../js/jquery-1.11.1.js"></script>
		<style>
			body{
				margin: 20px;
			}
			button{
				width: 100px;
				height: 50px;
				margin: 0px 5px;
				padding: 20px;
				background-color: #e0e0e0;
				border: 0;
			}
			#tab{
				width: 500px;
				height: 300px;
				bor der-radius: 5px;
				background-color: #ffff00;
				margin-left: 6px;
				line-height: 300px;
				text-align: center;
			}
		</style>
	</head>
	<body>
		<button id="tab1">tab01</button>
		<button id="tab2">tab02</button>
		<button id="tab3">tab03</button>
		<div id="tab">tab文字内容一</div>
		<script>
			$("#tab1").click(function(){
				$("#tab1").css("background-color","#ffff00");
				$("#tab2").css("background-color","#e0e0e0");
				$("#tab3").css("background-color","#e0e0e0");
				$("#tab").text("tab文字内容一");
			});
			$("#tab2").click(function(){
				$("#tab2").css("background-color","#ffff00");
				$("#tab1").css("background-color","#e0e0e0");
				$("#tab3").css("background-color","#e0e0e0");
				$("#tab").text("tab文字内容二");
			});
			$("#tab3").click(function(){
				$("#tab3").css("background-color","#ffff00");
				$("#tab1").css("background-color","#e0e0e0");
				$("#tab2").css("background-color","#e0e0e0");
				$("#tab").text("tab文字内容三");
			});
		</script>
	</body>
</html>